<template>
    <div id="SettleInNum"></div>
</template>
<style scoped>
#SettleInNum{
  width: 100%;
  height: calc(100% - 40px);
}

</style>
<script>
import * as echarts from 'echarts';
export default {
    props: {
    },
    components:{},
    data(){
        return{
        }
    },
    watch:{},
    methods:{
      get_SettleInNum(listDate, listCount){
        console.log("firm father", listDate, listCount)

        var chartDom = document.getElementById('SettleInNum');
        var myChart = echarts.init(chartDom);
        var option;
         var option = {
        backgroundColor:'#fff',
            tooltip: {
              trigger: 'axis',
              axisPointer: { // 坐标轴指示器，坐标轴触发有效
                type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
              }
            },
            grid: {
              left: '2%',
              right: '4%',
              bottom: '14%',
              top:'16%',
              containLabel: true
            },
            legend: {
            data: ['企业入驻数'],
            right: 10,
            top:12,
            textStyle: {
                color: "#000"
            },
            itemWidth: 12,
            itemHeight: 10,
            // itemGap: 35
        },
        xAxis: {
          type: 'category',
          data: listDate,
          axisLine: {
            lineStyle: {
              color: '#000'

            }
          },
          axisLabel: {
            textStyle: {
              fontFamily: 'Microsoft YaHei'
            }
          },
        },

        yAxis: {
          type: 'value',
          axisLine: {
            show: true,
            lineStyle: {
              color: '#000'
            }
          },
          splitLine: {
            show: true,
            lineStyle: {
              color: '#eee'
            }
          },
          axisLabel: {}
        },
        series: [{
          name: '企业入驻数',
          type: 'bar',
          barWidth: '15%',
          itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: '#00feff'
                }, {
                    offset: 1,
                    color: '#0286ff'
                }]),
                barBorderRadius: 12,
            },
          },
          data:listCount
        }]
      };
          option && myChart.setOption(option);
      }
    },
    created(){},
    mounted(){
      this.get_SettleInNum()
    },
}
</script>